<!DOCTYPE html>
<html lang="en">
    <head>
        <meta charset="utf-8" />
        <title>针对应用管理策略</title>
        <meta name="viewport" content="width=device-width, initial-scale=1.0" />

        <link href="../../assets/css/bootstrap.min.css" rel="stylesheet" />
        <link rel="stylesheet" href="../../assets/css/font-awesome.min.css" />

        <link rel="stylesheet" href="../../assets/css/ace.min.css" />
        <link rel="stylesheet" href="../../assets/css/ace-rtl.min.css" />
        <link rel="stylesheet" href="../../assets/css/ace-skins.min.css" />

        <!--[if lte IE 8]>
          <link rel="stylesheet" href="../../assets/css/ace-ie.min.css" />
        <![endif]-->

        <script src="../../assets/js/ace-extra.min.js"></script>

        <!-- HTML5 shim and Respond.js IE8 support of HTML5 elements and media queries -->

        <!--[if lt IE 9]>
        <script src="../../assets/js/html5shiv.js"></script>
        <script src="../../assets/js/respond.min.js"></script>
        <![endif]-->

        <style>
            @font-face { 
                font-family: "Open Sans"; /*这里是说明调用来的字体名字*/ 
                src: url('../../assets/font/OpenSans-Regular.ttf'); /*这里是字体文件路径*/ 
            } 
        </style>
    </head>

    <body>

        <div class="main-container">
            <div class="page-content">

                <div class="row">
                    <div class="col-sm-12">
                        <h4 style="padding-left:20px; margin-top: 20px;" class='header smaller lighter blue'>通用参数设置策略添加</h4>
                        <form class="form-horizontal" role="form" id="form">
                            <div class="form-group">
                                <label for="" class="col-sm-3 control-label no-padding-right"> 策略名称 </label>
                                <div class="col-sm-9">
                                    <input type="text" class="input-medium policy_desc" placeholder="" id="" name="policy-name" required>
                                </div>
                            </div>
                            
                            <div class="form-group">
                                <label for="" class="col-sm-3 control-label no-padding-right"> Web类流量统计点 </label>
                                <div class="col-sm-9">
                                    <input type="text" class="col-xs-1" placeholder="" id="Web_Hit_Threshold" name="web-point" required>
                                </div>
                            </div>

                            <div class="form-group">
                                <label for="" class="col-sm-3 control-label no-padding-right"> 关键词搜索阈值 </label>
                                <div class="col-sm-9">
                                    <input type="text" class="col-xs-1" placeholder="" id="KW_Threholds" name="search-threshold" required>

                                </div>
                            </div>

                            <div class="form-group">
                                <label for="" class="col-sm-3 control-label no-padding-right"> 搜索引擎 </label>

                                <div class="col-sm-9">
                                    <span class="help-block">填写格式为：www.baidu.com，一行填写一个搜索引擎</span>
                                    <textarea id="engine-textarea" name="engine-textarea" class="form-control input-xxlarge" style="height: 120px; resize:none;" required></textarea>
                                </div>
                            </div>

                            <div class="form-group">
                                <label for="" class="col-sm-3 control-label no-padding-right"> 上报cookie网站与其Key值 </label>

                                <div class="col-sm-9">
                                    <span class="help-block">填写格式为：网站名,key值，一行填写一个上报cookie网站和其key值，如：www.baidu.com,uid</span>
                                    <textarea id="cookie-textarea" name="cookie-textarea" class="form-control input-xxlarge" style="height: 120px; resize:none;" required></textarea>
                                </div>
                            </div>

                            <div class="form-group">
                                <div class="col-md-offset-3 col-md-9 col-sm-offset-3 col-sm-9">
                                    <button type="button" onclick="edit()" class="btn btn-primary btn-sm">
                                        <i class="icon-ok"></i>
                                        完成
                                    </button>

                                    &nbsp; &nbsp; &nbsp;
                                    <button type="button" class="btn btn-sm btn-danger" onclick="previous();">
                                        <i class="icon-undo"></i>
                                        取消
                                    </button>
                                </div>
                            </div>

                        </form>

                    </div>

                </div>

            </div>

        </div>

        <!-- basic scripts -->

        <!--[if !IE]> -->

        <script src="../../assets/js/jquery.js"></script>

        <!-- <![endif]-->

        <!--[if IE]>
        <script type="text/javascript">
         window.jQuery || document.write("<script src='../../assets/js/jquery-1.10.2.min.js'>"+"<"+"/script>");
        </script>
        <![endif]-->

        <script src="../../assets/js/bootstrap.min.js"></script>

        <script src="../../assets/js/jquery.validate.js"></script>

        <!--[if lte IE 8]>
          <script src="../../assets/js/excanvas.min.js"></script>
        <![endif]-->
        
        <script src="../../assets/js/ace-elements.min.js"></script>
        <script src="../../assets/js/ace.min.js"></script>
        <script src="../../assets/js/plugin/menu/menu.js"></script>
        <script src="../../assets/js/Base64.js"></script>
        <script src="logic.js"></script>
        
        <script type="text/javascript">
            var base64 = new Base64();
            var type = getQueryString("type");
            var DepotID = getQueryString("DepotID");
            var DepotName = getQueryString("DepotName");
            DepotName = base64.decode(DepotName);
            var id = getQueryString("id");
            
            jQuery(function($) {
                showData();
                $(".header").text(DepotName + "  策略管理");
                
//                $("#form").validate({
//                    errorClass: "help-block",
//                    errorElement: "div",
//                    errorPlacement: function(e, r) {
//                        r.parents(".form-group > div").append(e);
//                    },
//                    highlight: function(e) {
//                        $(e).closest(".form-group").removeClass("has-success has-error").addClass("has-error"),
//                                $(e).closest(".help-block").remove();
//                    },
//                    success: function(e) {
//                        e.closest(".form-group").removeClass("has-success has-error"),
//                                e.closest(".help-block").remove();
//                    },
//                    rules: {
//                        "policy-name":{
//                          required:!0  
//                        },
//                        "web-point": {
//                            required: !0,
//                            number: !0
//                        },
//                        "search-threshold": {
//                            required: !0,
//                            number: !0
//                        },
//                        "engine-textarea": {
//                            required: !0
//                        },
//                        "cookie-textarea": {
//                            required: !0
//                        }
//                    },
//                    messages: {
//                        "policy-name":{
//                          required:"输入不能为空！"  
//                        },
//                        "web-point": {
//                            required: "输入不能为空！",
//                            number: "输入内容不正确！"
//                        },
//                        "search-threshold": {
//                            required: "输入不能为空！",
//                            number: "输入内容不正确！"
//                        },
//                        "engine-textarea": {
//                            required: "输入不能为空！"
//                        },
//                        "cookie-textarea": {
//                            required: "输入不能为空！"
//                        }
//                    },
//                    submitHandler: function() {
//                        //alert("hello");
//                        save();
//                    }
//                });

            });
        </script>
    </body>
</html>
